<template>
    <div class="payresult">

        <msg title="$t('Yeah! You make it')" description="$t('Msg description')" :buttons="buttons"
             :icon="icon"></msg>
    </div>
</template>

<script>
    import {getMytoken} from '../../service/common';
    import store from 'store2';
    import {Msg} from 'vux'

    export default {
        components: {
            Msg
        },
        data() {
            return {
                description: 'msg description',
                icon: '',
                buttons: [{
                    type: 'primary',
                    text: 'Primary button',
                    onClick: this.changeIcon.bind(this)
                }, {
                    type: 'default',
                    text: 'Secondary button',
                    link: '/demo'
                }]
            };
        },
        created() {

        },
        computed: {},
        methods: {
            changeIcon () {
                if(!this.icon || this.icon === 'success') {
                    this.icon = 'warn'
                    return
                }
                if(this.icon === 'warn') {
                    this.icon = 'info'
                    return
                }
                if(this.icon === 'info') {
                    this.icon = 'waiting'
                    return
                }
                if(this.icon === 'waiting') {
                    this.icon = 'success'
                }
            }
        }
    }
</script>
<style scoped lang="less" rel="stylesheet/less">
    @import "../app";

    .payresult {
        height: 100%;
        background: #fff;
    }

</style>